// var express = require('express');
// var router = express.Router();
var student_router = require('./student_router');
/* GET home page. */
// router.get('/', function(req, res, next) {
//   res.render('index', { title: 'Express' });
// });

/* GET home page. */
function getHomepage(req, res, next){
	 res.render('index');
}

//注册路由
module.exports = function (app) {
  app.get('/', getHomepage);
  app.use('/student/create', student_router.create);
  app.use('/student/list'  , student_router.list);
  app.use('/student/update', student_router.update);
  app.use('/student/delete', student_router.delete);
  app.use('/student/addView',student_router.showAddView);
  app.use('/student/updateView',student_router.showUpdateView);

  console.log("路由注册成功了.");
    // app.post('/stduent/add.html', student_router.action.delete);

}
